package com.zhuge_new.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.zhuge_new.Base.BaseActivity;
import com.zhuge_new.R;
import com.zhuge_new.untils.ActivityStack;

/**
 * Created by lenovo on 2018-09-26.
 */

public class TransactionActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_transaction);
        init_title();
    }

    @Override
    public void init_title() {
        super.init_title();
        Intent intent=getIntent();
        String payType=intent.getStringExtra("payType");
        String paySum=intent.getStringExtra("paySum");
        String realSum=intent.getStringExtra("realSum");
        String payTime=intent.getStringExtra("payTime");
        String cardNo=intent.getStringExtra("cardNo");
        String rate=intent.getStringExtra("rate");


        TextView tv_title=findViewById(R.id.tv_nav_title);
        ImageView iv_back=findViewById(R.id.iv_nav_back);
        TextView tran_pattern=findViewById(R.id.tran_pattern);
        TextView tran_money=findViewById(R.id.tran_money);
        TextView tran_state=findViewById(R.id.tran_state);
        TextView tran_statebo=findViewById(R.id.tran_statebo);
        TextView tran_card=findViewById(R.id.tran_card);
        TextView tran_arriv_money=findViewById(R.id.tran_arriv_money);
        TextView tran_service=findViewById(R.id.tran_service);
        TextView tran_time=findViewById(R.id.tran_time);
        Button btn_home=findViewById(R.id.btn_home);
        iv_back.setOnClickListener(this);
        btn_home.setOnClickListener(this);


        tv_title.setText("交易明细");
        tran_pattern.setText(payType+"-河南省广之睿商务科技有限公司");
        tran_money.setText(paySum);
        tran_statebo.setText(payType);
        tran_card.setText(cardNo);
        tran_arriv_money.setText(realSum);
        tran_time.setText(payTime);
        tran_service.setText(rate);

    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_nav_back:
                ActivityStack.getScreenManager().popOneActivity(TransactionActivity.class);
                break;
            case R.id.btn_home:
                ActivityStack.getScreenManager().popActivities(TransactionActivity.class,CheckActivity.class);
                break;
        }
    }
}
